package com.arkisv.common.util;

import lombok.extern.slf4j.Slf4j;

import java.util.Date;

/**
 * 系统工具类
 * @ClassName: SystemUtil
 * @author King Feng
 * @date 2016年4月27日 下午4:09:34
 */
public class SystemUtil {
    /**
     * 开启打印
     */
    public final static boolean PRINT_OPEN = false;
    private final static String PRINT_PREFIX = "#### ";
    
    
    public static void println(Object obj){
        if(PRINT_OPEN){
            System.out.println(PRINT_PREFIX + DateUtil.format(new Date()) +" SystemUtil： "+ obj);
        }
    }
    
    public static void println(Exception e){
        if(PRINT_OPEN){
            System.out.println(PRINT_PREFIX + DateUtil.format(new Date()) +" SystemUtil： "+ ExceptionUtil.getMessage(e));
        }
    }
    
    public static void print(Object obj){
        if(PRINT_OPEN){
            System.out.print(PRINT_PREFIX + DateUtil.format(new Date()) +" SystemUtil： "+ obj);
        }
    } 
}
